package com.jevons.muffin.event;

import android.app.Activity;
import android.content.Intent;

/**
 * Copyright 2020 JxGIS
 *
 * @file FinishActivityEvent
 * @auth linaisheng
 * Created on 2021/6/30.
 * Description：
 */
public class FinishActivityEvent implements IActionEvent {

    private Integer resultCode;
    private Intent data;

    public FinishActivityEvent() {
        this(Activity.RESULT_OK, null);
    }

    public FinishActivityEvent(int resultCode) {
        this(resultCode, null);
    }

    public FinishActivityEvent(Integer resultCode, Intent intent) {
        this.resultCode = resultCode;
        this.data = intent;
    }

    public boolean hasResultCode() {
        return resultCode != null;
    }

    public Integer getResultCode() {
        return resultCode;
    }

    public Intent getData() {
        return data;
    }
}
